import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { HomeComponent } from './home.component';

const homeRoutes: Routes = [
  { path: 'home',
    component: HomeComponent,
    children: [
      { path: 'trains', loadChildren: '../trains/trains.module#TrainsModule' },
      { path: 'discover', loadChildren: '../discover/discover.module#DiscoverModule' },
      { path: 'dashboard', loadChildren: '../dashboard/dashboard.module#DashboardModule' },
      { path: 'fault', loadChildren: '../fault/fault.module#FaultModule' },
      { path: 'users', loadChildren: '../users/users.module#UsersModule' }
    ]
  },
];

@NgModule({
  imports: [
    RouterModule.forChild(homeRoutes)
  ],
  exports: [
    RouterModule
  ]
})
export class HomeRoutingModule { }
